<!-- templates/addContainer.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加容器</title>
    <link href="//unpkg.com/layui@2.9.21-rc/dist/css/layui.css" rel="stylesheet">
</head>
<body>
<div class="layui-container">
    <h2>添加容器</h2>
    <form class="layui-form" action="/addContainer/" method="post">
        {% csrf_token %}
        <div class="layui-form-item">
            <label class="layui-form-label">容器名称</label>
            <div class="layui-input-block">
                <input type="text" name="container_name" required lay-verify="required" placeholder="请输入容器名称" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<script src="//unpkg.com/layui@2.9.21-rc/dist/layui.js"></script>
<script>
layui.use('form', function(){
  var form = layui.form;

  // 监听提交
  form.on('submit(formDemo)', function(data){
    // 这里可以添加额外的验证逻辑
    return true; // 返回 true 表示继续提交
  });
});
</script>
</body>
</html>
